function [ aout ] = wrapToPi( ain )
%UNTITLED4 Summary of this function goes here
%   Detailed explanation goes here

    aout = ain - floor(ain/(2*pi) + .5)*2*pi;

end

